Back to Configuration | Onward to the Login view

Working with Views

The "look and feel" of Remote Mail is highly configurable. You can even have several different configurations running on the same server. You could present one appearance to Netscape users and a very different appearance to AOL users.

If you look in the "RM" folder, you will see 6 files with names like "login.remotemail". Each of these files is a view, and each view has a specific function, such as displaying a login screen. You can modify a view simply by opening the file in a text editor (such as BBEdit) and changing the HTML. Text inside square brackets ([ ]) are Remote Mail tags, which are explained later in detail.

The filenames are significant. This means you can't rename "mailbox.remotemail" to "mymailbox.remotemail". It won't work. However, the location of the file is not important. You can copy the entire "RM" folder, give it a new name (eg: "MyViews") and edit that copy of your views. To use that set of views, use the URL "http://yourserver.dom/myviews/mailbox.remotemail". This is what allows you to have multiple "look and feel" options on the same server.

The views are:

Making URLs Unique

There is one Remote Mail tag that is available in all the views, [xid]. This name stands for "transaction ID", but it is really just a string of random numbers. Its purpose is to ensure that some URLs are unique, which forces browsers to reload pages that would normally be retrieved from the local disk cache.

For example, the URL "/rm/mailbox.remotemail" will display the mailbox contents. If a user deletes several messages, and then views the mailbox again using the same URL, most browsers will simply pull that page from the cache and the deleted messages will still be displayed. By adding [xid] to the URL, you present a different URL to the browser every time the link is displayed. "/rm/mailbox.remotemail?xid=[xid]" might become, for example "/rm/mailbox.remotemail?xid=ABC123xyz", and the browser will retrieve a new copy of the mailbox.

Remote Mail Commands

The following commands can be added as search arguments to the URL, or as POST data from a form (but not both at the same time). These commands are usually executed before a view is displayed. For examples on how they are used, see the templates provided with the software. All message numbers are 1 or higher.

msgno=number
Sets the current message to the indicated message number. This is normally only useful when displaying the Message view, because it determines which message will be displayed.
delete=number
Deletes the indicated message. For example, this can be used in conjunction with the Message view to provide a "Delete and Read Next" link.
logout=anything
The presence of this command causes the session to be logged out. The same effect can be accomplished by linking to the Logout view.
new_mailhost=POP server hostname, new_user=POP username, new_password=POP password
These commands cause a new session to be created. Normally, a form containing these fields is provided by the Login view, which then POSTs the data to the mailbox view. The session is created and the mailbox is then displayed. The new_mailhost command is optional. If it is not present, the default mailhost will be used.
reply=number
This causes headers and body of the indicated message to be parsed and made available to the Compose view. It is only useful in conjunction with the Compose view.
send=anything
Sends a message. Remote Mail looks for the appropriate form data (recipients, cc, bcc, subject, and body) and creates a message from it.
checknew=anything
Causes the user's POP session to be "invisibly" logged out and then logged back in. The result is that new messages are picked up and can be displayed in the mailbox. Currently deleted messages are actually deleted and are gone forever.


More Net.Dreams Software